package org.jiajie.coffeecodes.enums;

import java.time.LocalDate;

/**
 * @author jie
 * @date 2021/10/17 2:48 PM
 */
public class Test1 {
    public static void main(String[] args) {
//        double x = Double.parseDouble(args[0]);
//        double y = Double.parseDouble(args[1]);
//        test(ExtendedOperation.class, x, y);

        System.out.println(String.valueOf(LocalDate.now().plusYears(100).getYear() % 2000));
    }

    private static <T extends Enum<T> & Operation> void test(Class<T> opEnumType, double x, double y) {
        for (Operation op : opEnumType.getEnumConstants()){
            System.out.printf("%f %s %f = %f%n", x, op, y, op.apply(x,y));
        }
    }
}
